home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / CIncludes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  3.8 KB  |  130 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        QDOffscreen.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __QDOFFSCREEN__
  13. #define __QDOFFSCREEN__
  14.  
  15. #ifndef __QUICKDRAW__
  16. #include <Quickdraw.h>
  17. #endif
  18.  
  19.  
  20. enum {
  21.  
  22.  
  23. /* New error codes */
  24.     cDepthErr = -157    /*invalid pixel depth*/
  25. };
  26.  
  27. enum {
  28.     pixPurgeBit = 0,
  29.     noNewDeviceBit = 1,
  30.     useTempMemBit = 2,
  31.     keepLocalBit = 3,
  32.     pixelsPurgeableBit = 6,
  33.     pixelsLockedBit = 7,
  34.     mapPixBit = 16,
  35.     newDepthBit = 17,
  36.     alignPixBit = 18,
  37.     newRowBytesBit = 19,
  38.     reallocPixBit = 20,
  39.     clipPixBit = 28,
  40.     stretchPixBit = 29,
  41.     ditherPixBit = 30,
  42.     gwFlagErrBit = 31
  43.     };
  44.  
  45. enum {
  46.     pixPurge = 1 << pixPurgeBit,
  47.     noNewDevice = 1 << noNewDeviceBit,
  48.     useTempMem = 1 << useTempMemBit,
  49.     keepLocal = 1 << keepLocalBit,
  50.     pixelsPurgeable = 1 << pixelsPurgeableBit,
  51.     pixelsLocked = 1 << pixelsLockedBit,
  52.     mapPix = 1 << mapPixBit,
  53.     newDepth = 1 << newDepthBit,
  54.     alignPix = 1 << alignPixBit,
  55.     newRowBytes = 1 << newRowBytesBit,
  56.     reallocPix = 1 << reallocPixBit,
  57.     clipPix = 1 << clipPixBit,
  58.     stretchPix = 1 << stretchPixBit,
  59.     ditherPix = 1 << ditherPixBit,
  60.     gwFlagErr = 1 << gwFlagErrBit
  61.     };
  62.  
  63. typedef unsigned long GWorldFlags;
  64.  
  65. /* Type definition of a GWorldPtr */
  66.  
  67. typedef CGrafPtr GWorldPtr;
  68.  
  69.  
  70. #ifdef __cplusplus
  71. extern "C" {
  72. #endif
  73. pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld,short PixelDepth,const Rect *boundsRect,
  74.     CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  75.     = {0x203C,0x0016,0x0000,0xAB1D}; 
  76. pascal Boolean LockPixels(PixMapHandle pm)
  77.     = {0x203C,0x0004,0x0001,0xAB1D}; 
  78. pascal void UnlockPixels(PixMapHandle pm)
  79.     = {0x203C,0x0004,0x0002,0xAB1D}; 
  80. pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld,short pixelDepth,
  81.     const Rect *boundsRect,CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  82.     = {0x203C,0x0016,0x0003,0xAB1D}; 
  83. pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  84.     = {0x203C,0x0004,0x0004,0xAB1D}; 
  85. pascal void GetGWorld(CGrafPtr *port,GDHandle *gdh)
  86.     = {0x203C,0x0008,0x0005,0xAB1D}; 
  87. pascal void SetGWorld(CGrafPtr port,GDHandle gdh)
  88.     = {0x203C,0x0008,0x0006,0xAB1D}; 
  89. pascal void CTabChanged(CTabHandle ctab)
  90.     = {0x203C,0x0004,0x0007,0xAB1D}; 
  91. pascal void PixPatChanged(PixPatHandle ppat)
  92.     = {0x203C,0x0004,0x0008,0xAB1D}; 
  93. pascal void PortChanged(GrafPtr port)
  94.     = {0x203C,0x0004,0x0009,0xAB1D}; 
  95. pascal void GDeviceChanged(GDHandle gdh)
  96.     = {0x203C,0x0004,0x000A,0xAB1D}; 
  97. pascal void AllowPurgePixels(PixMapHandle pm)
  98.     = {0x203C,0x0004,0x000B,0xAB1D}; 
  99. pascal void NoPurgePixels(PixMapHandle pm)
  100.     = {0x203C,0x0004,0x000C,0xAB1D}; 
  101. pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  102.     = {0x203C,0x0004,0x000D,0xAB1D}; 
  103. pascal void SetPixelsState(PixMapHandle pm,GWorldFlags state)
  104.     = {0x203C,0x0008,0x000E,0xAB1D}; 
  105. pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  106.     = {0x203C,0x0004,0x000F,0xAB1D}; 
  107. pascal QDErr NewScreenBuffer(const Rect *globalRect,Boolean purgeable,GDHandle *gdh,
  108.     PixMapHandle *offscreenPixMap)
  109.     = {0x203C,0x000E,0x0010,0xAB1D}; 
  110. pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  111.     = {0x203C,0x0004,0x0011,0xAB1D}; 
  112. pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  113.     = {0x203C,0x0004,0x0012,0xAB1D}; 
  114. pascal Boolean QDDone(GrafPtr port)
  115.     = {0x203C,0x0004,0x0013,0xAB1D}; 
  116. pascal long OffscreenVersion(void)
  117.     = {0x7014,0xAB1D}; 
  118. pascal QDErr NewTempScreenBuffer(const Rect *globalRect,Boolean purgeable,
  119.     GDHandle *gdh,PixMapHandle *offscreenPixMap)
  120.     = {0x203C,0x000E,0x0015,0xAB1D}; 
  121. pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  122.     = {0x203C,0x0004,0x0016,0xAB1D}; 
  123. pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  124.     = {0x203C,0x0004,0x0017,0xAB1D}; 
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128.  
  129. #endif
  130.